import Mock from 'mockjs';

Mock.mock(`${process.env.VUE_APP_API_BASE_URL}/home`, 'post', () => {
    let information = [];
    let headName = ['sos', '出围栏', '心率', '血压']
    for (let i = 0; i < 4; i++) {
        information.push(Mock.mock({
            props: headName[i],
            "value|20-50": 100,
            "number|100-1000": 100,
            "down|0-2": 0,
        }))
    }
    let policeTopFive = Mock.mock({
        'list|5': [
            {
                name: '@cname',
                "alerts|1-30": 22,
                "institution": '@csentence(5)',
            }
        ]
    }).list;
    let alarm = Mock.mock({
        'list|5': [
            {
                "type|0-5": 0,
                time: '@now()',
                name: '@cname',
                info: '@city()',
                site: '@county(true)',
                institutions: '@csentence(3, 5)'
            }
        ]
    }).list;
    return {
        information,
        policeTopFive,
        alarm
    }
})
